package com.trkj.dao.jpa;

import java.util.List;

import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.CrudRepository;

import com.trkj.pojos.MedcineDetail;
import com.trkj.vo.MedcineDetailVo;

/**
 * 药品详情
 * @author Administrator
 *
 */
public interface IMedcineDetailDAO extends CrudRepository<MedcineDetail, Long> {
	//查询所有药品详情
	@Query("select new com.trkj.vo.MedcineDetailVo(c.medcineId,c.medcineBaozhiqi,c.medcineEffect,c.medcineImage,c.medcineName,c.medcineNote,c.medcinePrice,c.medcineType.medcineTypeName,c.medcineCompany.medcinecompanyName) from MedcineDetail c order by c.medcineId desc")
	public List<MedcineDetailVo> findAllMedcineDetail();
	
}
